import {empty} from './validate'

/**
 * 转数字
 * @param num
 * @returns {number}
 */
export function toNumber(num) {
    if (empty(num)) num = 0
    return Number(num)
}
